#ifndef UERU_GAMESTATE_PLAY
#define UERU_GAMESTATE_PLAY

#include "GameState.hpp"
#include "World.hpp"
#include <SFML/Graphics/String.hpp>
#include <SFML/Graphics/View.hpp>
#include <memory>

class GameStatePlay : public GameState
{
public:
	GameStatePlay(unsigned int level = 0);
	virtual ~GameStatePlay(){};

	virtual void Render();

	void CheckIfSolved();

	virtual void Update(float dt);

	virtual void HandleEvent(const sf::Event& event);

private:
	void CreateTargetWorldImage();

	std::unique_ptr<World> m_world;
	std::unique_ptr<World> m_targetWorld;
	std::unique_ptr<sf::Sprite> m_targetSprite;
	sf::Image m_targetImage;
	sf::String m_solvedInstructions;
	sf::String m_solvedBanner;
	unsigned int m_level;
	sf::Clock m_timer;
	sf::String m_timeString;
	float m_solvedTime;

	bool m_solved;
};

#endif
